package com.baiye.template.controller;

import com.baiye.template.common.R;
import com.baiye.template.pojo.SysInfo;
import com.baiye.template.service.SysInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author GUOZHIPENG
 * @version 1.0
 * @date 2021/9/4 10:30
 */

@RestController
@RequestMapping("/sys")
public class SysInfoController {
    @Autowired
    private SysInfoService sysInfoService;

    @RequestMapping(value = "/getInfo",method = RequestMethod.GET)
    public R getInfo(){
        SysInfo sysInfo = sysInfoService.getInfo();
        return new R().ok(sysInfo);
    }
}
